/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chapter6;

import java.io.File;

/**
 *
 * @author Denise Carolina
 */
public class SelfTest7 {

    static String [] dirs = new String [2];

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        dirs[0] = "dir1";
        dirs[1] = "dir2";
        
        for(String d : dirs){
            //Code 1
            String path = d;
            
            File file = new File(path, "test2.txt");
//            path = File.separator + d;
            // Code 2
            System.out.println("path:: " + path + " "+ file.exists() + " ");
            System.out.println("path:: " + path + " "+ file.isFile() + " ");
        }
    }

}
